package com.lantosec.hmrp.modules.archives.entity;

import java.time.LocalDateTime;
import java.util.Date;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.archives.vo.UserHappyFuneralVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 领导干部参与操办本人及近亲属婚丧喜庆事宜情况报告表 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-14
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserHappyFuneral extends BaseEntity<UserHappyFuneralVO> {

    private static final long serialVersionUID = 1L;
    public UserHappyFuneral(UserHappyFuneralVO vo){
        this.userHappyFuneralId = vo.getUserHappyFuneralId();
        this.userId = vo.getUserId();
        this.familyId = vo.getFamilyId();
        this.familyName = vo.getFamilyName();
        this.familyAppellation = vo.getFamilyAppellation();
        this.familyWorkUnit = vo.getFamilyWorkUnit();
        this.arrangeMatters = vo.getArrangeMatters();
        this.arrangeDate = vo.getArrangeDate();
        this.arrangeAdr = vo.getArrangeAdr();
        this.gift = vo.getGift();
        this.cashGift = vo.getCashGift();
        this.giftDeal = vo.getGiftDeal();
        this.createId = vo.getCreateId();
        this.createUser = vo.getCreateUser();
        this.createTime = vo.getCreateTime();
        this.verifyId = vo.getVerifyId();
        this.verifyUser = vo.getVerifyUser();
        this.verifyTime = vo.getVerifyTime();
        this.verifyStatus = vo.getVerifyStatus();
    }

    @Override
    public UserHappyFuneralVO convertToVO(){
        return new UserHappyFuneralVO(this);
    }


    /**
     * 主键ID
     */
    @TableId(value = "user_happy_funeral_id", type = IdType.ASSIGN_UUID)
    private String userHappyFuneralId;

    /**
     * 用户主表ID
     */
    private String userId;

    /**
     * 家庭成员ID
     */
    private String familyId;

    /**
     * 家庭成员姓名
     */
    private String familyName;

    /**
     * 家庭成员称谓，字典值
     */
    private String familyAppellation;

    /**
     * 家庭成员工作单位
     */
    private String familyWorkUnit;

    /**
     * 操办事项
     */
    private String arrangeMatters;

    /**
     * 办理时间
     */
    private String arrangeDate;

    /**
     * 办理地点
     */
    private String arrangeAdr;

    /**
     * 收到礼品为json包含字段（name，礼品名称，字符串；num，礼品数量，小数；礼品总金额（人民币），total_rmb，小数）
     */
    private String gift;

    /**
     * 礼金金额
     */
    private Float cashGift;

    /**
     * 处理情况
     */
    private String giftDeal;

    /**
     * 创建人ID
     */
    private String createId;

    /**
     * 创建人姓名
     */
    private String createUser;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 审核人ID
     */
    private String verifyId;

    /**
     * 审核人姓名
     */
    private String verifyUser;

    /**
     * 审核时间
     */
    private Date verifyTime;

    /**
     * 审核状态（0：未审核，1：以审核）
     */
    private Integer verifyStatus;


    public enum ColName {
        user_happy_funeral_id, user_id, family_id, family_name, family_appellation, family_work_unit, arrange_matters, arrange_date, arrange_adr, gift, cash_gift, gift_deal, create_id, create_user, create_time, verify_id, verify_user, verify_time, verify_status, 
    }
}
